import { defineStore } from 'pinia'
import {ref} from 'vue'

export const useConfigStore = defineStore('config', () => {
  const config = ref({
    author: 'eleven',
    superClass: 'net.lesscoding.common.BaseEntity',
    tablePrefix: 'tb_',
    fieldPrefix: '',
    basePackage: 'net.lesscoding',
    dateType: 'LocalDateTime',
    lombok: true,
    swagger: 'Knife4j',
    page: 'MybatisPage',
    export: false
  })
  const refreshConfig = (data) => {
    config.value = data
  }
  return {
    config,
    refreshConfig
  }
}, {
  persist: true
})
